﻿<ribbon:RibbonWindow x:Class="RibbonTestApplication.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary"
        xmlns:local="clr-namespace:RibbonTestApplication"
        Title="Main Ribbon Window"
		x:Name="RibbonWindow"
		Width="640" Height="480">
    <ribbon:RibbonWindow.Resources>
        <local:ItemSources x:Key="item" />
        <local:VisibilityConverter x:Key="vconverter" />
    </ribbon:RibbonWindow.Resources>
    <Grid x:Name="LayoutRoot" DataContext="{StaticResource item}">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <ribbon:Ribbon x:Name="Ribbon" >
            <ribbon:Ribbon.ApplicationMenu>
                <ribbon:RibbonApplicationMenu SmallImageSource="Images\MyComputer.ico">
                    <ribbon:RibbonApplicationMenuItem Header="Desktop" ImageSource="Images\Desktop.ico" KeyTip="D" Click="RibbonApplicationMenuItem_Click"/>

                    <ribbon:RibbonApplicationMenuItem Header="Floppy" ImageSource="Images\HardDrive.ico" KeyTip="F">
                        <ribbon:RibbonApplicationMenuItem Header="Primary Floppy" ImageSource="Images\FloppyDrive3.ico" KeyTip="P" Click="RibbonApplicationMenuItem_Click" />
                        <ribbon:RibbonApplicationMenuItem Header="Secondary Floppy" ImageSource="Images\FloppyDrive5.ico" KeyTip="S" Click="RibbonApplicationMenuItem_Click" />
                    </ribbon:RibbonApplicationMenuItem>

                    <ribbon:RibbonApplicationMenuItem Header="My Pictures" ImageSource="Images\MyPictures.ico" KeyTip="M" Click="RibbonApplicationMenuItem_Click"/>
                    <ribbon:RibbonApplicationMenuItem Header="My Videos" ImageSource="Images\MyVideos.ico" KeyTip="V" Click="RibbonApplicationMenuItem_Click"/>
                    <ribbon:RibbonSeparator />
                    <ribbon:RibbonApplicationSplitMenuItem Header="Search Program" ImageSource="Images\Search.ico">
                        <ribbon:RibbonApplicationMenuItem Header="BMP Images" ImageSource="Images\BMPImage.ico" Click="RibbonApplicationMenuItem_Click"/>
                        <ribbon:RibbonApplicationMenuItem Header="JPEG Images" ImageSource="Images\JPEGImage.ico" Click="RibbonApplicationMenuItem_Click"/>
                        <ribbon:RibbonApplicationMenuItem Header="GIF Images" ImageSource="Images\GIFImage.ico" Click="RibbonApplicationMenuItem_Click"/>
                        <ribbon:RibbonApplicationMenuItem Header="PNG Images" ImageSource="Images\PNGImage.ico" Click="RibbonApplicationMenuItem_Click"/>
                    </ribbon:RibbonApplicationSplitMenuItem>


                    <ribbon:RibbonApplicationMenu.FooterPaneContent>
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="*"/>
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <StackPanel Orientation="Horizontal" HorizontalAlignment="Left" Grid.Column="0">
                                <ribbon:RibbonButton Content="My Music" SmallImageSource="Images\MyMusic.ico" Click="RibbonButton_Click"/>
                                <ribbon:RibbonButton Content="Web Folders" SmallImageSource="Images\WebFolders.ico" Click="RibbonButton_Click"/>
                                <ribbon:RibbonButton Content="Settings" SmallImageSource="Images\Settings.ico" Click="RibbonButton_Click"/>
                            </StackPanel>
                            <ribbon:RibbonButton SmallImageSource="Images\AudioCD.ico" Label="Exit" HorizontalAlignment="Right" Grid.Column="2" Command="ApplicationCommands.Close" />
                        </Grid>
                    </ribbon:RibbonApplicationMenu.FooterPaneContent>

                    <ribbon:RibbonApplicationMenu.AuxiliaryPaneContent>
                        <TextBlock Text="This is the Auxilary Pane. You can also add RibbonGallery to AuxiliaryPane." />
                    </ribbon:RibbonApplicationMenu.AuxiliaryPaneContent>
                </ribbon:RibbonApplicationMenu>


            </ribbon:Ribbon.ApplicationMenu>

            <ribbon:RibbonTab Header="Home" KeyTip="H">
                <ribbon:RibbonGroup Header="Control Panel">
                    <ribbon:RibbonButton LargeImageSource="Images\ControlPanel.ico"
                                         Label="Settings Folder" 
                                         ToolTipTitle="Settings Folder"
                                         ToolTipDescription="Helps you change settings of the folder and also allows you to change certain system settings"
                                         ToolTipImageSource="Images\MyDocuments.ico"/>

                    <ribbon:RibbonButton SmallImageSource="Images\ConfigurationSettings.ico"
                                         Label="Config" 
                                         ToolTipTitle="Configuration Settings"
                                         ToolTipDescription="Allows you to change Configuration settings for the current selection"
                                         ToolTipImageSource="Images\MyBriefcase.ico"/>
                    <ribbon:RibbonButton SmallImageSource="Images\NetworkConnections.ico"
                                         Label="Network"
                                         ToolTipTitle="Network Settings"
                                         ToolTipDescription="Allows you to change Network settings for the current selection"
                                         ToolTipImageSource="Images\Helpandsupport.ico"/>
                    <ribbon:RibbonButton SmallImageSource="Images\ProgramGroup.ico"
                                         Label="Programs" 
                                         ToolTipTitle="Program Settings"
                                         ToolTipDescription="You can change the Program settings"
                                         ToolTipImageSource="Images\TextDocument.ico"/>
                
                </ribbon:RibbonGroup>
                <ribbon:RibbonGroup Header="Common Tasks">
                    <ribbon:RibbonCheckBox Label="Single Check" />
                    <ribbon:RibbonToggleButton Label="Entire Network" SmallImageSource="Images\EntireNetwork.ico"  />
                    <ribbon:RibbonTextBox Label="Run" SmallImageSource="Images\RUN.ico" />
                    <ribbon:RibbonComboBox Label="Folders" IsEditable="True" SmallImageSource="Images\SharingOverlay.ico" ItemsSource="{Binding Path=FolderItems}" />
                    <ribbon:RibbonComboBox Label="1" 
                                          SmallImageSource="Images/DVDDrive.ico"
                                          IsEditable="True" >
                        <ribbon:RibbonGallery SelectedValue="Green"
                                              SelectedValuePath="Content"
                                              MaxColumnCount="1">
                            <ribbon:RibbonGalleryCategory>
                                <ribbon:RibbonGalleryItem Content="Green" Foreground="Green" />
                                <ribbon:RibbonGalleryItem Content="Blue" Foreground="Blue" />
                                <ribbon:RibbonGalleryItem Content="Orange" Foreground="Orange" />
                            </ribbon:RibbonGalleryCategory>
                        </ribbon:RibbonGallery>
                    </ribbon:RibbonComboBox>


                    <ribbon:RibbonSeparator />
                    
                    <!-- Split Button -->
                    <ribbon:RibbonSplitButton Label="WorkGroup" LargeImageSource="Images\Workgroup.ico">
                        <ribbon:RibbonMenuItem Header="Folder Options" ImageSource="Images\FolderOptions.ico" />
                        <ribbon:RibbonMenuItem Header="Printers and Fax" ImageSource="Images\printersFaxes.ico"/>
                        <ribbon:RibbonMenuItem Header="Network Service" ImageSource="Images\NetworkService.ico"/>
                    </ribbon:RibbonSplitButton>
                    <ribbon:RibbonTwoLineText LineStackingStrategy="BlockLineHeight" Text="Two lines of Text"/>
                </ribbon:RibbonGroup>

            </ribbon:RibbonTab>
            <ribbon:RibbonTab ContextualTabGroupHeader="ContextualHeader" Header="Selected">
                <ribbon:RibbonGroup>
                    <ribbon:RibbonButton LargeImageSource="Images\HelpFile.ico"
                                         Label="Help" />
                </ribbon:RibbonGroup>
            </ribbon:RibbonTab>
            <ribbon:RibbonTab Header="View">
                
            </ribbon:RibbonTab>
            <ribbon:RibbonTab Header="Insert">

            </ribbon:RibbonTab>
            <ribbon:RibbonTab Header="Format">

            </ribbon:RibbonTab>
            <!-- Forcing Contextual Tab to Visible -->
            <ribbon:Ribbon.ContextualTabGroups>
                <ribbon:RibbonContextualTabGroup Header="ContextualHeader"
                                                 Visibility="Visible"
	                                            Background="Orange" />
                <!--Visibility="{Binding ElementName=rchMain, Path=Selection, Converter={StaticResource vconverter}}"-->
            </ribbon:Ribbon.ContextualTabGroups>
            
            <!-- Quick Access TooBar-->
            <ribbon:Ribbon.QuickAccessToolBar>
                <ribbon:RibbonQuickAccessToolBar HorizontalAlignment="Right">
                    <ribbon:RibbonButton SmallImageSource="Images\RAMDrive.ico" KeyTip="R" />
                    <ribbon:RibbonButton SmallImageSource="Images\OpenFolder.ico" KeyTip="O"/>
                    <ribbon:RibbonButton SmallImageSource="Images\MyRecentDocuments.ico" KeyTip="R"/>
                </ribbon:RibbonQuickAccessToolBar>
            </ribbon:Ribbon.QuickAccessToolBar>
            
            <!-- Ribbon Context Menu-->
            <ribbon:Ribbon.ContextMenu>
                <ribbon:RibbonContextMenu>
                    <ribbon:RibbonMenuButton SmallImageSource="Images\RecycleBinf.ico" Label="Special ContextMenu Option" />
                    <ribbon:RibbonMenuButton SmallImageSource="Images\RecycleBine.ico" Label="Normal ContextMenu Option" />
                    <ribbon:RibbonMenuButton SmallImageSource="Images\RemovableDrive.ico" Label="Extra ContextMenu Option" />
                </ribbon:RibbonContextMenu>
            </ribbon:Ribbon.ContextMenu>
        </ribbon:Ribbon>
        <RichTextBox x:Name="rchMain" Grid.Row="1" />
    </Grid>
</ribbon:RibbonWindow>
